/**
 * \file pppnode.h
 * \author Ameen Jaber
 * \author Mohamad Noureddine
 * \author Mohamed Sabra
 * \brief pppnode definitions
 */
#ifndef __PPPNODE_H_
#define __PPPNODE_H_

#include <iostream>
#include <stdio.h>
#include <dbitvec.h>
#include <vector>

using namespace std;


class PPPNode { public:
    int id; //!< helper to index the node in the graph vector
    int data[1024]; //!< dummy data variable

    PPPNode() {
        id = -1;
    }

    PPPNode(int _id) {
        id = _id;
    }
};

class PPPEdge { public:
    int to; //!< from is implicit in the frist index of the adjaqcency list
};

class PPPWEdge { public:
    int to; //!< from is implicit in the frist index of the adjaqcency list
    int w;  //!< weight
};


template < class V, class E > 
class PPPG { public:
    vector <V *> nodes;
    vector < vector < E > * > edges;
};

typedef PPPG<PPPNode, PPPEdge>   PPPGraph;
typedef PPPG<PPPNode, PPPWEdge>   PPPWGraph;

template < class G > 
class Traverse {public:
    dbitvec visited; //!< denotes whether visited or not
    vector <int> parent; //!< set to the index of parent in PPPGraph
    G * graph; //!< the graph to traverse
};

template < int TC, class G > 
class MultiTraverse {public:
    dbitvec visited[TC]; //!< denotes whether visited or not
    vector <int> parent; //!< set to the index of parent in PPPGraph
    G * graph; //!< the graph to traverse
};
#endif
